<template>
  <div class="person">
    <h2>{{name}}</h2>
    <ul>
        <li>测试:{{a+1}}</li>
        <li>姓名:{{uname1}}</li>
        <li>年龄:{{age}}</li>
        <li>资产:{{money}}</li>
    </ul>
    <button @click="dome">点击试试</button>
    <button @click="chang1">改变名字</button>
    <button @click="chang2">改变年龄</button>
  </div>
</template>

<script>
export default {
    name:'Person',
    data(){
        return{
            name:'我是一个Person组件'
        }
    },
    methods:{
        dome(){
            console.log(this,'jaq');
        },
        chang1(){
            this.uname1 = '赵菲'
        },
        chang2(){
            this.age.real = 24
        }
    },
    props:['a','uname1','age','money']
}
</script>

<style>
.person{
    background: skyblue;
    padding: 10px;
}
</style>